//
//  YNXMPPprotocol.h
//  YNIMFramework
//
//  Created by 黄旭 on 2021/7/20.
//

#ifndef YNXMPPprotocol_h
#define YNXMPPprotocol_h

#import <UIKit/UIKit.h>
@class YNMessage;
@class YNUser;

@protocol YNXMPPprotocol <NSObject>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark XMPPManager
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///连接服务器成功
-(void)xmppStreamDidConnect;
//认证成功(上线)
- (void)xmppStreamDidAuthenticate;
//认证失败（登录失败）
-(void)didNotAuthenticate;
//连接超时
-(void)xmppStreamConnectDidTimeout;
//同时登录（被挤）
-(void)sameTimeLogin;
//断开连接
-(void)xmppStreamDidDisconnect:(NSInteger)code;
//其他用户离线
-(void)xmppIMuserLogout:(YNUser *)user;
//其他用户登录
-(void)xmppIMuserLogin:(YNUser*)user;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark Roster Part
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///搜索默认的结果回调
-(void)ynslRosterDidSearchInfo:(NSDictionary*)dic;

-(void)getOrgAndUserDataSaveFinished:(NSDictionary*)dic;

-(void)getOrgAndUserDataSaveFail;

-(void)getLoginUserInitInforSucceed:(NSDictionary*)dic;
//群组信息和用户关系信息保存完毕
-(void)groupInforSaveFinished;

-(void)discussionSaveFinished;

-(void)projectTeamSaveFinished;

-(void)deleteRoamMessageListSuccess:(bool)result;
//登录收取处理数据全部结束
-(void)loginLoadDataFinish;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark message Part
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//撤回消息
-(void)messengerChatWithDrawUpdateMsgId:(NSString*)msgId success:(BOOL)success;
//更新消息会话页面
-(void)updataRecentChatInterface;
//拉取一次漫游消息成功
-(void)pullTheRoamingMessageFinished;
//接受到消息
-(void)receiveChatMessage:(YNMessage*)message;
//接受到回执消息
-(void)receiveMessageReceipt:(YNMessage*)message;
//转发消息通知
-(void)transpondMessageNotification:(YNMessage*)message;
///接收到广播消息
-(void)receiveBroadcastUpdataInterface:(YNMessage *)message;

-(void)updateTheBroadcastReaedForId:(NSString*)idString;
/// 接收到消息刷新最近会话列表
/// @param chatId 消息体的唯一packid
/// @param userNo 消息对象用户id  --两个参数不能同时为空
-(void)receiveChatMesWithRecentChatId:(NSString*)chatId userNo:(NSString*)userNo;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark group Part
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//创建讨论组请求成功
- (void)createGroupWithRequestFinished:(NSString *)groupName naturalName:(NSString *)naturalName;
//创建讨论组请求失败
- (void)createGroupWithRequestFailed:(NSString *)error;

- (void)reciveAddGroupUserInfo:(BOOL)isSuccss;

- (void)reciveLeaveGroupInfo:(BOOL)isSuccss;

- (void)reciveModifyGroupSubject:(BOOL)isSuccss resultDictionary:(NSDictionary *)dic;

- (void)reciveGroupInfo:(NSDictionary *)dic;

- (void)reciveDiscussionInfo:(NSDictionary *)dic;
//查询项目组信息回调
- (void)reciveProjectTeamInfo:(NSDictionary *)dic;
//获取到群共享文件
- (void)reciveFileInfoOfGroupShare:(NSDictionary *)dic;
//成功删除群共享文件
- (void)didFinishedDeleteShareGroupFile:(NSString *)fileId;
//删除群共享文件
- (void)failedDeleteShareGroupFile:(NSString *)fileId;
/**
 * 概述: 获取一批用户的详细信息
 * @pram isSuccss 是否成功
 * @pram dic 用户信息字典
 */
- (void)reciveUserList:(BOOL)isSuccss userListDictionary:(NSArray *)array;
//讨论组名字被修改的服务器通知
- (void)reciveManyChatGroupNameWithModify:(NSString *)subject;
//创建讨论组返回的presence(状态信息)
- (void)reciveGroupCreatWithGroupNo:(NSString *)groupNo userNo:(NSString *)userNo  affiliation:(NSString *)affiliation role:(NSString *)role;
//退出讨论组返回的presence
- (void)reciveLeaveGroupWithGoupNo:(NSString *)groupNo userNo:(NSString *)userNo affiliation:(NSString *)affiliation role:(NSString *)role;
///修改群讨论组名字
-(void)modifyDiscussionGroupName:(NSString*)name;
///修改群组名字
-(void)modifyGroupName:(NSString*)name;
///离开讨论组
-(void)leaveDiscussionGroupName:(NSString*)name;
///离开群
-(void)leaveGroupName:(NSString*)name;
///离开项目组
-(void)leaveProjectTeamName:(NSString*)name;
///其他成员离开讨论组
-(void)exitDiscussionGroupName:(NSString*)name;
///其他群成员离开群
-(void)exitGroupName:(NSString*)name;
///其他成员离开项目组
-(void)exitProjectTeamGroupName:(NSString*)name;
///群更新
-(void)updateGroupName:(NSString*)name;
///讨论组更新
-(void)updateDiscussionGroupName:(NSString*)name;
///项目组更新
-(void)updateProjectTeamGroupName:(NSString*)name;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma mark 公用
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-(void)didError:(NSString*)errorMsg;
@end

#endif /* YNXMPPprotocol_h */
